ad86d43d560c7b5f68e0c466510cfca53e25df37,src/com/offsec/nethunter/MITMfFragment.java,MITMfInject,onCreateView,#LayoutInflater#ViewGroup#Bundle#,523
Before Change
// Textfield for Injection Count Limit
M_Injection_Number_Text = (EditText) rootView.findViewById(R.id.mitmf_inject_times_text);
M_Injection_Number_Text.setEnabled(false);
M_Injection_Number_Text.setOnFocusChangeListener(new View.OnFocusChangeListener() {
public void onFocusChange(View v, boolean hasFocus) {
if (!hasFocus) {
NUMtext = M_Injection_Number_Text.getText().toString();
}
}
});
// Checkbox for Injection Count Limit
final CheckBox InjectionNumberCheckbox = (CheckBox) rootView.findViewById(R.id.mitmf_inject_times);
After Change
M_Injection_Number_Text = (EditText) rootView.findViewById(R.id.mitmf_inject_times_text);
M_Injection_Number_Text.setEnabled(false);
// Detect changes to TextField
M_Injection_Number_Text.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
}
@Override
public void afterTextChanged(Editable s)
{
removeFromCmd(M_Injection_Number + NUMtext);
M_Injection_Number = " --count-limit ";
NUMtext = M_Injection_Number_Text.getText().toString();
addToCmd(M_Injection_Number + NUMtext);
}
});
// Checkbox for Injection Count Limit
final CheckBox InjectionNumberCheckbox = (CheckBox) rootView.findViewById(R.id.mitmf_inject_times);